package oop;

public class Demo2_Phone {
    public static void main(String[] args) {

    }
}


class Phone1 {
    private String brand;//品牌
    private int price;//价格

    public String getBrand() {
        return this.brand; //this. 可以省略，不加系统会默认加上
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}


